home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / SOUNDS.C < prev    next >
C/C++ Source or Header  |  1993-03-16  |  17KB  |  676 lines

  1. /*    SCCS Id: @(#)sounds.c    3.0    90/02/05 */
  2. /* NetHack may be freely redistributed.  See license for details. */
  3. /* Copyright (c) 1989 Janet Walz, Mike Threepoint */
  4.  
  5. #define ONAMES_H    /* comment line for pre-compiled headers */
  6. /* block some unused #defines to avoid overloading some cpp's */
  7.  
  8. #include "hack.h"
  9. #include "edog.h"
  10.  
  11. #ifdef OVLB
  12.  
  13. static int FDECL(domonnoise,(struct monst *));
  14.  
  15. void
  16. verbalize(str)
  17. register const char *str;
  18. {
  19.     if(flags.soundok) pline("\"%s\"", str);
  20. }
  21.  
  22. #endif /* OVLB */
  23.  
  24. #ifdef SOUNDS
  25.  
  26. #ifdef OVL0
  27.  
  28. void
  29. dosounds()
  30. {
  31.     register xchar hallu;
  32.     register struct mkroom *sroom;
  33.     register xchar roomtype;
  34.     register int croomno;
  35.     boolean gold_in_vault, u_in_room;
  36.     register int vx, vy;
  37.  
  38. #ifdef __GNULINT__
  39.     gold_in_vault = u_in_room = FALSE;
  40. #endif
  41.  
  42.     hallu = Hallucination ? 1 : 0;
  43.  
  44.     if(!flags.soundok || u.uswallow) return;
  45.  
  46.     if (fountsound && !rn2(400))
  47.     switch (rn2(3)+hallu) {
  48.         case 0:
  49.         You("hear bubbling water.");
  50.         break;
  51.         case 1:
  52.         You("hear water falling on coins...");
  53.         break;
  54.         case 2:
  55.         You("hear the splashing of a naiad.");
  56.         break;
  57.         case 3:
  58.         You("seem to hear a soda fountain!");
  59.         break;
  60.     }
  61.     if (sinksound && !rn2(300))
  62.     switch (rn2(2)+hallu) {
  63.         case 0:
  64.         You("hear a slow drip.");
  65.         break;
  66.         case 1:
  67.         You("hear a gurgling noise.");
  68.         break;
  69.         case 2:
  70.         You("seem to hear dishes being washed!");
  71.         break;
  72.     }
  73.     if (!rn2(200)) {
  74.     roomtype = OROOM;
  75.     for (sroom = &rooms[0]; ; sroom++) {    /* find any special room */
  76.         if (sroom->hx < 0) break;        /* no more rooms */
  77.         if (sroom->rtype != OROOM) {
  78.         croomno = inroom(u.ux,u.uy);
  79.         u_in_room = croomno >= 0 && sroom == &rooms[croomno];
  80.         if (sroom->rtype < SHOPBASE)
  81.             roomtype = sroom->rtype;
  82.         else if (!u_in_room) {
  83.             /* player not presently in shop */
  84.             /* NOTE: other special room types disappear when player
  85.                enters (except VAULT) */
  86.             roomtype = SHOPBASE;
  87.         }
  88.         break;
  89.         }
  90.     }
  91.  
  92.     if (roomtype == VAULT) {
  93.         gold_in_vault = FALSE;
  94.         for (vx = sroom->lx; vx <= sroom->hx && !gold_in_vault; vx++)
  95.         for (vy = sroom->ly; vy <= sroom->hy; vy++)
  96.             if (g_at(vx, vy)) {
  97.             gold_in_vault = TRUE;
  98.             break;
  99.             }
  100.     }
  101.  
  102.     switch (roomtype) {
  103. #ifdef THRONES
  104.         case COURT:
  105.         switch (rn2(3)+hallu) {
  106.             case 0:
  107.             You("hear the tones of courtly conversation.");
  108.             break;
  109.             case 1:
  110.             You("hear a sceptre being pounded in judgment.");
  111.             break;
  112.             case 2:
  113.             pline("Someone just shouted \"Off with %s head!\"",
  114.                 flags.female ? "her" : "his");
  115.             break;
  116.             case 3:
  117.             You("seem to hear Queen Beruthiel's cats!");
  118.             break;
  119.         }
  120.         break;
  121. #endif
  122.         case SWAMP:
  123.         switch (rn2(2)+hallu) {
  124.             case 0:
  125.             You("hear mosquitoes!");
  126.             break;
  127.             case 1:
  128.             You("smell marsh gas!");    /* so it's a smell...*/
  129.             break;
  130.             case 2:
  131.             You("seem to hear Donald Duck.");
  132.             break;
  133.         }
  134.         break;
  135.         case VAULT:
  136.         if(gd_sound())
  137.           switch (rn2(2)+hallu) {
  138.             case 0:
  139.             if (gold_in_vault && !u_in_room)
  140.                 You("hear someone counting money.");
  141.             else
  142.                 You("hear someone searching.");
  143.             break;
  144.             case 1:
  145.             You("hear the footsteps of a guard on patrol.");
  146.             break;
  147.             case 2:
  148.             You("seem to hear Ebenezer Scrooge!");
  149.             break;
  150.         }
  151.         break;
  152.         case BEEHIVE:
  153.         switch (rn2(2)+hallu) {
  154.             case 0:
  155.             You("hear a low buzzing.");
  156.             break;
  157.             case 1:
  158.             You("hear an angry drone.");
  159.             break;
  160.             case 2:
  161.             You("seem to hear bees in your %shelmet!",
  162.                 uarmh ? "" : "(nonexistent) ");
  163.             break;
  164.         }
  165.         break;
  166.         case MORGUE:
  167.         switch (rn2(2)+hallu) {
  168.             case 0:
  169.             You("suddenly realize it is unnaturally quiet.");
  170.             break;
  171.             case 1:
  172.             pline("The hair on the back of your %s stands up.",
  173.                 body_part(NECK));
  174.             break;
  175.             case 2:
  176.             pline("The hair on your %s seems to stand up.",
  177.                 body_part(HEAD));
  178.             break;
  179.         }
  180.         break;
  181.         case BARRACKS:
  182.         switch (rn2(3)+hallu) {
  183.             case 0:
  184.             You("hear dice being thrown.");
  185.             break;
  186.             case 1:
  187.             You("hear blades being honed.");
  188.             break;
  189.             case 2:
  190.             You("hear loud snoring.");
  191.             break;
  192.             case 3:
  193.             You("seem to hear General MacArthur!");
  194.             break;
  195.         }
  196.         break;
  197.         case ZOO:
  198.         switch (rn2(2)+hallu) {
  199.             case 0:
  200. You("hear a sound reminding you of an elephant stepping on a peanut.");
  201.             break;
  202.             case 1:
  203.             You("hear a sound reminding you of a trained seal.");
  204.             break;
  205.             case 2:
  206.             You("seem to hear Doctor Doolittle!");
  207.             break;
  208.         }
  209.         break;
  210.         case SHOPBASE:
  211.         if(tended_shop(sroom))
  212.           switch (rn2(2)+hallu) {
  213.             case 0:
  214.             You("hear the chime of a cash register.");
  215.             break;
  216.             case 1:
  217.             You("hear someone cursing shoplifters.");
  218.             break;
  219.             case 2:
  220.             You("seem to hear Neiman and Marcus arguing!");
  221.             break;
  222.           }
  223.         break;
  224.         default:
  225.         break;
  226.     }
  227.     }
  228. }
  229.  
  230. #endif /* OVL0 */
  231. #ifdef OVLB
  232.  
  233. #include "eshk.h"
  234.  
  235. #define NOTANGRY(mon)    mon->mpeaceful
  236. #define ANGRY(mon)    !NOTANGRY(mon)
  237.  
  238. void
  239. growl(mtmp)
  240. register struct monst *mtmp;
  241. {
  242.     /* presumably nearness and soundok checks have already been made */
  243.     switch (mtmp->data->msound) {
  244.     case MS_SILENT:
  245.         break;
  246.     case MS_MEW:
  247.     case MS_HISS:
  248.         pline("%s hisses!", Monnam(mtmp));
  249.         break;
  250.     case MS_BARK:
  251.     case MS_GROWL:
  252.         pline("%s growls!", Monnam(mtmp));
  253.         break;
  254.     case MS_ROAR:
  255.         pline("%s roars!", Monnam(mtmp));
  256.         break;
  257.     case MS_BUZZ:
  258.         kludge("%s buzzes!", Monnam(mtmp));
  259.         break;
  260.     case MS_SQEEK:
  261.         kludge("%s squeals!", Monnam(mtmp));
  262.         break;
  263.     case MS_SQAWK:
  264.         kludge("%s screeches!", Monnam(mtmp));
  265.         break;
  266.     case MS_NEIGH:
  267.         kludge("%s neighs!", Monnam(mtmp));
  268.         break;
  269.     }
  270. }
  271.  
  272. void
  273. yelp(mtmp)
  274. register struct monst *mtmp;
  275. /* the sounds of mistreated pets */
  276. {
  277.     /* presumably nearness and soundok checks have already been made */
  278.     switch (mtmp->data->msound) {
  279.     case MS_MEW:
  280.         pline("%s yowls!", Monnam(mtmp));
  281.         break;
  282.     case MS_BARK:
  283.     case MS_GROWL:
  284.         pline("%s yelps!", Monnam(mtmp));
  285.         break;
  286.     case MS_ROAR:
  287.         kludge("%s snarls!", Monnam(mtmp));
  288.         break;
  289.     case MS_SQEEK:
  290.         kludge("%s squeals!", Monnam(mtmp));
  291.         break;
  292.     case MS_SQAWK:
  293.         kludge("%s screaks!", Monnam(mtmp));
  294.         break;
  295.     }
  296. }
  297.  
  298. void
  299. whimper(mtmp)
  300. register struct monst *mtmp;
  301. /* the sounds of distressed pets */
  302. {
  303.     /* presumably nearness and soundok checks have already been made */
  304.     switch (mtmp->data->msound) {
  305.     case MS_MEW:
  306.     case MS_GROWL:
  307.         pline("%s whimpers.", Monnam(mtmp));
  308.         break;
  309.     case MS_BARK:
  310.         pline("%s whines.", Monnam(mtmp));
  311.         break;
  312.     case MS_SQEEK:
  313.         kludge("%s squeals.", Monnam(mtmp));
  314.         break;
  315.     }
  316. }
  317.  
  318. #endif /* OVLB */
  319.  
  320. #endif /* SOUNDS */
  321.  
  322. #ifdef OVLB
  323.  
  324. /* for the connoisseurs ... */
  325. static const char *Qmen[] = {
  326.     "Max",      /* Born */
  327.     "Wolfgang", /* Pauli */
  328.     "Louis",    /* de Broglie */
  329.     "Erwin",    /* Schroedinger */
  330.     "Werner",   /* Heisenberg */
  331.     "Niels",    /* Bohr */
  332.     "Paul",     /* Dirac */
  333.     "Pascual",  /* Jordan */
  334.     "Dick",     /* Feynman */
  335.     "Sam" }; /* Beckett ("Oh, boy." :-) */
  336.  
  337. struct monst *
  338. qname(mtmp)
  339. struct monst *mtmp;
  340. {
  341.     return(christen_monst(mtmp, Qmen[rn2(SIZE(Qmen))]));
  342. }
  343.  
  344. static int
  345. domonnoise(mtmp)
  346. register struct monst *mtmp;
  347. {
  348.     /* presumably nearness checks have already been made */
  349.     if (!flags.soundok) return(0);
  350.     switch (mtmp->data->msound) {
  351. #ifdef ORACLE
  352.     case MS_ORACLE:
  353.         return doconsult(mtmp);
  354. #endif
  355. #if defined(ALTARS) && defined(THEOLOGY)
  356.     case MS_PRIEST:
  357.         priest_talk(mtmp);
  358.         break;
  359. #endif
  360. #ifdef SOUNDS
  361.     case MS_SILENT:
  362.         break;
  363.     case MS_SQEEK:
  364.         kludge("%s squeaks.", Monnam(mtmp));
  365.         break;
  366.     case MS_SQAWK:
  367.         kludge("%s squawks.", Monnam(mtmp));
  368.         break;
  369.     case MS_MEW:
  370.         if (mtmp->mtame) {
  371.         if (mtmp->mconf || mtmp->mflee || mtmp->mtrapped || 
  372.             moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5)
  373.             kludge("%s yowls.", Monnam(mtmp));
  374.         else if (EDOG(mtmp)->hungrytime > moves + 1000)
  375.             kludge("%s purrs.", Monnam(mtmp));
  376.         else
  377.             kludge("%s mews.", Monnam(mtmp));
  378.         }
  379.     case MS_HISS:
  380.         if (!mtmp->mpeaceful && !mtmp->mtame)
  381.         kludge("%s hisses!", Monnam(mtmp));
  382.         break;
  383.     case MS_BUZZ:
  384.         if (!mtmp->mpeaceful && !mtmp->mtame)
  385.         kludge("%s buzzes angrily.", Monnam(mtmp));
  386.         break;
  387.     case MS_GRUNT:
  388.         kludge("%s grunts.", Monnam(mtmp));
  389.         break;
  390.     case MS_BARK:
  391.         if (flags.moonphase == FULL_MOON && night()) {
  392.         kludge("%s howls.", Monnam(mtmp));
  393.         break;
  394.         } else if (mtmp->mtame || mtmp->mpeaceful) {
  395.         if (mtmp->mtame &&
  396.             (mtmp->mconf || mtmp->mflee || mtmp->mtrapped ||
  397.              moves > EDOG(mtmp)->hungrytime || mtmp->mtame < 5))
  398.             kludge("%s whines.", Monnam(mtmp));
  399.         else if (EDOG(mtmp)->hungrytime > moves + 1000)
  400.             kludge("%s yips.", Monnam(mtmp));
  401.         else
  402.             kludge("%s barks.", Monnam(mtmp));
  403.         break;
  404.         }
  405.     case MS_GROWL:
  406.         if (!mtmp->mpeaceful && !mtmp->mtame)
  407.         kludge("%s growls!", Monnam(mtmp));
  408.         break;
  409.     case MS_ROAR:
  410.         if (!mtmp->mpeaceful && !mtmp->mtame)
  411.         kludge("%s roars!", Monnam(mtmp));
  412.         break;
  413.     case MS_NEIGH:
  414.         kludge("%s neighs.", Monnam(mtmp));
  415.         break;
  416.     case MS_WAIL:
  417.         kludge("%s wails mournfully.", Monnam(mtmp));
  418.         break;
  419.     case MS_GURGLE:
  420.         kludge("%s gurgles.", Monnam(mtmp));
  421.         break;
  422.     case MS_BURBLE:
  423.         kludge("%s burbles.", Monnam(mtmp));
  424.         break;
  425.     case MS_SHRIEK:
  426.         kludge("%s shrieks.", Monnam(mtmp));
  427.         aggravate();
  428.         break;
  429.     case MS_IMITATE:
  430.         kludge("%s imitates you.", Monnam(mtmp));
  431.         break;
  432.     case MS_DJINNI:
  433.         if (mtmp->mtame) verbalize("Thank you for freeing me!");
  434.         else if (mtmp->mpeaceful) verbalize("I'm free!");
  435.         else verbalize("This will teach you not to disturb me!");
  436.         break;
  437.     case MS_MUMBLE:
  438.         kludge("%s mumbles incomprehensibly.", Monnam(mtmp));
  439.         break;
  440.     case MS_HUMANOID:
  441.         /* Generic humanoid behaviour. */
  442.         if (!mtmp->mpeaceful && !mtmp->mtame) break;
  443.         if (mtmp->mflee)
  444.         kludge("%s wants nothing to do with you.", Monnam(mtmp));
  445.         else if (mtmp->mhp < mtmp->mhpmax/4)
  446.         kludge("%s moans.", Monnam(mtmp));
  447.         else if (mtmp->mconf || mtmp->mstun)
  448.         verbalize(!rn2(3) ? "Huh?" : rn2(2) ? "What?" : "Eh?");
  449.         else if (!mtmp->mcansee)
  450.         verbalize("I can't see!");
  451.         else if (mtmp->mtrapped)
  452.         verbalize("I'm trapped!");
  453.         else if (mtmp->mhp < mtmp->mhpmax/2)
  454.         kludge("%s asks for a potion of healing.", Monnam(mtmp));
  455.         /* Specific monster's interests */
  456.         else if (is_elf(mtmp->data))
  457.         kludge("%s complains about orcs.", Monnam(mtmp));
  458.         else if (is_dwarf(mtmp->data))
  459.         kludge("%s talks about mining.", Monnam(mtmp));
  460.         else if (likes_magic(mtmp->data))
  461.         kludge("%s talks about spellcraft.", Monnam(mtmp));
  462.         else if (carnivorous(mtmp->data))
  463.         kludge("%s discusses what kinds of meat are safe to eat.", Monnam(mtmp));
  464.         else switch (monsndx(mtmp->data)){
  465. # ifdef TOLKIEN
  466.         case PM_HOBBIT:
  467.             if (mtmp->mhpmax - mtmp->mhp >= 10)
  468. kludge("%s complains about unpleasant dungeon conditions.", Monnam(mtmp));
  469.             else
  470.                 kludge("%s asks you about the One Ring.", Monnam(mtmp));
  471.             break;
  472. # endif
  473.         case PM_ARCHEOLOGIST:
  474. kludge("%s describes a recent article in \"Spelunker Today\" magazine.", Monnam(mtmp));
  475.             break;
  476.         case PM_QUANTUM_MECHANIC:
  477.             /* a trademark line for other Quantum Leap cultists -3. */
  478.             if (mtmp->mnamelth && strcmp(NAME(mtmp), "Sam") == 0)
  479.             verbalize("Oh, boy.");
  480.             else {
  481.             const char *Qman;
  482.  
  483.             do Qman = Qmen[rn2(SIZE(Qmen))];
  484.             while (mtmp->mnamelth && strcmp(NAME(mtmp), Qman) == 0);
  485.  
  486.             kludge("%s asks if you've seen %s anywhere around.", 
  487.                 Monnam(mtmp), Qman);
  488.             }            
  489.             break;
  490.         default:
  491.             kludge("%s discusses dungeon exploration.", Monnam(mtmp));
  492.         }
  493.         break;
  494.     case MS_SEDUCE:
  495. # ifdef SEDUCE
  496.         if (mtmp->data->mlet != S_NYMPH &&
  497.         could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) {
  498.             (void) doseduce(mtmp);
  499.             break;
  500.         }
  501.         switch ((poly_gender() != is_female(mtmp)) ? rn2(3) : 0) {
  502. # else
  503.         switch ((poly_gender() == 0) ? rn2(3) : 0) {
  504. # endif
  505.         case 2:
  506.             verbalize("Hello, sailor.");
  507.             break;
  508.         case 1:
  509.             kludge("%s comes on to you.", Monnam(mtmp));
  510.             break;
  511.         default:
  512.             kludge("%s cajoles you.", Monnam(mtmp));
  513.         }
  514.         break;
  515. # ifdef KOPS
  516.     case MS_ARREST:
  517.         if (mtmp->mpeaceful)
  518.         pline("\"Just the facts, %s.\"",
  519.               flags.female ? "Ma'am" : "Sir");
  520.         else switch (rn2(3)) {
  521.         case 1:
  522.             verbalize("Anything you say can be used against you.");
  523.             break;
  524.         case 2:
  525.             verbalize("You're under arrest!");
  526.             break;
  527.         default:
  528.             verbalize("Stop in the name of the Law!");
  529.         }
  530.         break;
  531. # endif
  532.     case MS_LAUGH:
  533.         switch (rn2(4)) {
  534.         case 1:
  535.             kludge("%s giggles.", Monnam(mtmp));
  536.             break;
  537.         case 2:
  538.             kludge("%s chuckles.", Monnam(mtmp));
  539.             break;
  540.         case 3:
  541.             kludge("%s snickers.", Monnam(mtmp));
  542.             break;
  543.         default:
  544.             kludge("%s laughs.", Monnam(mtmp));
  545.         }
  546.         break;
  547. # ifdef INFERNO
  548.     case MS_BRIBE:
  549.         if (mtmp->mpeaceful && !mtmp->mtame) {
  550.         (void) demon_talk(mtmp);
  551.         break;
  552.         }
  553.         /* fall through */
  554. # endif
  555.     case MS_CUSS:
  556.         if (!mtmp->mpeaceful && !mtmp->mtame)
  557.         cuss(mtmp);
  558.         break;
  559.     case MS_GUARD:
  560.         if (u.ugold)
  561.         verbalize("Please drop that gold and follow me.");
  562.         else
  563.         verbalize("Please follow me.");
  564.         break;
  565.     case MS_NURSE:
  566.         if (uwep)
  567.         verbalize("Put that weapon away before you hurt someone!");
  568.         else if (uarmc || uarm || uarmh || uarms || uarmg || uarmf)
  569.         if (pl_character[0] == 'H')
  570.             verbalize("Doc, I can't help you unless you cooperate.");
  571.         else
  572.             verbalize("Please undress so I can examine you.");
  573. # ifdef SHIRT
  574.         else if (uarmu)
  575.         verbalize("Take off your shirt, please.");
  576. # endif
  577.         else verbalize("Relax, this won't hurt a bit.");
  578.         break;
  579.     case MS_SELL: /* pitch, pay, total */
  580.         if (ANGRY(mtmp))
  581.         kludge("%s mentions how much %s dislikes %s customers.",
  582.             ESHK(mtmp)->shknam,
  583.             ESHK(mtmp)->ismale ? "he" : "she",
  584.             ESHK(mtmp)->robbed ? "non-paying" : "rude");
  585.         else if (ESHK(mtmp)->following)
  586.         if (strncmp(ESHK(mtmp)->customer, plname, PL_NSIZ)) {
  587.             pline("\"Hello %s!  I was looking for %s.\"",
  588.                 plname, ESHK(mtmp)->customer);
  589.             ESHK(mtmp)->following = 0;
  590.         } else {
  591.             pline("\"Hello %s!  Didn't you forget to pay?\"",
  592.                 plname);
  593.         }
  594.         else if (ESHK(mtmp)->robbed)
  595.         kludge("%s complains about a recent robbery.", ESHK(mtmp)->shknam);
  596.         else if (ESHK(mtmp)->billct)
  597.         kludge("%s reminds you that you haven't paid yet.", ESHK(mtmp)->shknam);
  598.         else if (mtmp->mgold < 50)
  599.         kludge("%s complains that business is bad.", ESHK(mtmp)->shknam);
  600.         else if (mtmp->mgold > 4000)
  601.         kludge("%s says that business is good.", ESHK(mtmp)->shknam);
  602.         else
  603.         kludge("%s talks about the problem of shoplifters.", ESHK(mtmp)->shknam);
  604.         break;
  605. # ifdef ARMY
  606.     case MS_SOLDIER:
  607.         if (!mtmp->mpeaceful)
  608.         switch (rn2(3)) {
  609.         case 2:
  610.             verbalize("Resistance is useless!");
  611.             break;
  612.         case 1:
  613.             verbalize("You're dog meat!");
  614.             break;
  615.         default:
  616.             verbalize("Surrender!");
  617.         }
  618.         break;
  619. # endif
  620. #endif /* SOUNDS */
  621.     }
  622.     return(1);
  623. }
  624.  
  625.  
  626. int
  627. dotalk()
  628. {
  629.     register struct monst *mtmp;
  630.     register int tx,ty;
  631.  
  632.     if (u.uswallow) {
  633.     pline("They won't hear you out there.");
  634.     return(0);
  635.     }
  636.  
  637.     pline("Talk to whom? [in what direction] ");
  638.     (void) getdir(0);
  639.  
  640.     if (u.dz) {
  641.     pline("They won't hear you %s there.", u.dz < 0 ? "up" : "down");
  642.     return(0);
  643.     }
  644.  
  645.     if (u.dx == 0 && u.dy == 0) {
  646. /*
  647.  * Let's not include this.  It raises all sorts of questions: can you wear
  648.  * 2 helmets, 2 amulets, 3 pairs of gloves or 6 rings as a marilith,
  649.  * etc...  --KAA
  650. #ifdef POLYSELF
  651.     if (u.umonnum == PM_ETTIN) {
  652.         You("discover that your other head makes boring conversation.");
  653.         return(1);
  654.     }
  655. #endif
  656. */
  657.     pline("Talking to yourself is a bad habit for a dungeoneer.");
  658.     return(0);
  659.     }
  660.  
  661.     tx = u.ux+u.dx; ty = u.uy+u.dy;
  662.     if ((Blind && !Telepat) || !MON_AT(tx, ty) ||
  663.         (mtmp = m_at(tx, ty))->mimic || mtmp->mundetected) {
  664.     pline("I see nobody there.");
  665.     return(0);
  666.     }
  667.     if (!mtmp->mcanmove || mtmp->msleep) {
  668.     kludge("%s seems not to notice you.", Monnam(mtmp));
  669.     return 0;
  670.     }
  671.  
  672.     return domonnoise(mtmp);
  673. }
  674.  
  675. #endif /* OVLB */
  676.